package edu.sctu.zhuyingzhi.month201505.day20150522.treadTest;

/**
 * Created by user13 on 2015/5/20.
 */
public class Producer extends Thread{
    private String name;
    private Store s;

    public Producer(String name, Store s){
        this.s = s;
        this.name = name;
    }

    public void run(){


        while(true){

            s.produce(name);
            try {
                sleep(1000);
            }catch (Exception e){
                System.out.println("中断");
            }
        }



    }


}
